<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<f:view locale="#{salaoMB.internacionalizacao.currentLocale}">
	<h:head>
		<meta http-equiv="Content-Type"
			content="text/html; charset=ISO-8859-1" />
		<title>Avaliação</title>
		<link rel="stylesheet" href="../css/salao.css" type="text/css"
			media="screen" />

	</h:head>

	<h:body styleClass="bg-content">
		<f:metadata>
			<f:viewParam name="idAgendamento" value="#{meusAgendamentosMB.agendamentoRating.id}"></f:viewParam>
			<f:viewParam name="idEstabelecimento" value="#{meusAgendamentosMB.agendamentoRating.estabelecimento.id}"></f:viewParam>
			<f:viewParam name="nomeFantasiaEstabelecimento"	value="#{meusAgendamentosMB.agendamentoRating.estabelecimento.nomeFantasia}"></f:viewParam>	
			<f:viewParam name="descricaoServico" value="#{meusAgendamentosMB.agendamentoRating.funcionarioServicos.servicos.descricao}"></f:viewParam>					
			<f:viewParam name="nota" value="#{meusAgendamentosMB.agendamentoRating.ratingEstabelecimento.rate}"></f:viewParam>					
			<f:viewParam name="titulo" value="#{meusAgendamentosMB.agendamentoRating.ratingEstabelecimento.titulo}"></f:viewParam>					
			<f:viewParam name="comentario" value="#{meusAgendamentosMB.agendamentoRating.ratingEstabelecimento.comentario}"></f:viewParam>					
		</f:metadata>


		<table width="100%">
			<tr>
				<td><ui:include src="/index.xhtml" /></td>
			</tr>
		</table>
		<table width="60%" align="center">
			<tr>
				<td><p:panel header="Avalia&ccedil;&atilde;o Servi&ccedil;o">
						<h:form>
							<p:messages id="msg" showDetail="true" autoUpdate="true" closable="true" />
							<h:panelGrid columns="2" id="avaliacaoServicoEstabelecimento" border="0">
							
								<h:outputText value="Sal&atilde;o de Beleza:" />
								<h:outputText value="#{meusAgendamentosMB.agendamentoRating.estabelecimento.nomeFantasia}" />
								
								<h:outputText value="Servi&ccedil;o:" />
								<h:outputText value="#{meusAgendamentosMB.agendamentoRating.funcionarioServicos.servicos.descricao}" />
							
								<h:outputText value="Nota:" />
								<p:rating value="#{meusAgendamentosMB.agendamentoRating.ratingEstabelecimento.rate}" />
								
								<h:outputText value="T&iacute;tulo:" />
								<h:inputText value="#{meusAgendamentosMB.agendamentoRating.ratingEstabelecimento.titulo}" />
								
								<h:outputText value="Coment&aacute;rio:" />								
								<p:inputTextarea rows="10" cols="100" counter="counter" maxlength="1000" value="#{meusAgendamentosMB.agendamentoRating.ratingEstabelecimento.comentario}"      
										    counterTemplate="{0} characters remaining." autoResize="false"/>
											    
								<h:outputText id="counter" />
								<h:inputHidden />									    
								
								<h:inputHidden />								
								<p:commandButton type="submit"
													actionListener="#{meusAgendamentosMB.rating}"
													value="Gravar"  />	
														    
							</h:panelGrid>
						</h:form>
					</p:panel>
				</td>
			</tr>
		</table>
	</h:body>
</f:view>
</html>
